FACER: An API usage-based code-example recommender for opportunistic reuse
نویسندگان
چکیده
To save time, developers often search for code examples that implement their desired software features. Existing techniques typically focus on finding snippets a single given query, which means need to perform separate each functionality. In this paper, we propose FACER (F eature-driven A PI usage-based C ode E xamples R ecommender), technique avoids repeated searches through opportunistic reuse. Specifically, the selected snippet matches initial finds and suggests related represent features developer may want next. first constructs fact repository by parsing source of open-source Java projects obtain methods’ textual information, call graphs, Application Programming Interface (API) usages. It then detects unique clustering methods based similar API usages, where cluster represents feature or Finally, it frequently co-occurring across using frequent pattern mining recommends from mined patterns. evaluate FACER, run 120 Android apps GitHub. We manually validate detected method clusters with an automated evaluation determine best parameters (e.g., similarity threshold) FACER. recruit 10 professional along 39 experienced students judge FACER’s recommendation methods. Our results show that, average, recommendations are 80% precise. also survey total 20 understand reuse experiences, feedback usability usefulness The 95% our surveyed find idea useful during
منابع مشابه
An API for Runtime Code Patching
We present a post-compiler program manipulation tool called Dyninst which provides a C++ class library for program instrumentation. Using this library, it is possible to instrument and modify application programs during execution. A unique feature of this library is that it permits machine-independent binary instrumentation programs to be written. We describe the interface that a tool sees when...
متن کاملLessons from an Experiment on Opportunistic Reuse
EVERY YEAR, MORE than US$5 billion worth of software projects are cancelled or abandoned worldwide.1 Many of these projects are dropped not because their software failed but because the original project aims and assumptions changed. When cancellations occur after signifi cant development, they lock in potentially useful, reusable software artifacts. If we can fi nd effi cient ways to salvage an...
متن کاملA Web API ecosystem through feature-based reuse
The current Web API landscape does not scale well: every API requires its own hardcoded clients in an unusually short-lived, tightly coupled relationship of highly subjective quality. This directly leads to inflated development costs, and prevents the design of a more intelligent generation of clients that provide cross-API compatibility. We introduce 5 principles to establish an ecosystem in w...
متن کاملMining usage patterns for the Android API
API methods are not used alone, but in groups and following patterns. However, despite being a key information for API users, most usage patterns are not described in official API documents. In this article, we report a study that evaluates the feasibility of automatically enriching API documents with information on usage patterns. For this purpose, we mine and analyze 1,952 usage patterns, fro...
متن کاملCode Reuse Through Reflection: An Empirical Perspective
Applying reuse-supporting techniques has the potential for increasing software productivity, shortening development time and decreasing maintenance costs. However, at present, there is no methodology incorporating reuse as a standard development practice and the question of which factors affect reuse, their level of significance and assessment is still a controversial issue. Code reuse, on the ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Empirical Software Engineering
سال: 2021
ISSN: ['1382-3256', '1573-7616']
DOI: https://doi.org/10.1007/s10664-021-10000-w